<!DOCTYPE HTML>
<html lang="zh-CN">
<head>
    <title>Excel/CSV 转 JSON 工具 - FeHelper</title>
    <meta charset="UTF-8">
    <link rel="stylesheet" href="index.css" />
</head>
<body>
    <div class="wrapper" id="excel2jsonContainer">
        <div class="main-navbar">
            <div class="navbar-brand">
                <a href="https://fehelper.com" target="_blank" class="brand-link">
                    <img src="../static/img/fe-16.png" alt="fehelper"/>
                    <span class="brand-text">FeHelper</span>
                    <span class="brand-subtitle">Excel/CSV 转 JSON</span>
                </a>
            </div>
            <div class="navbar-actions panel-title">
                <a href="#" class="x-donate-link"><i class="nav-icon">❤&nbsp;</i>打赏鼓励</a>
                <a class="x-other-tools"><i class="icon-plus-circle"></i> 探索更多实用工具 <span class="tool-market-badge">工具市场</span></a>
            </div>
        </div>
        <div class="main-container">
            <div class="panel panel-default">
                <div class="panel-body excel2json-flex-panel">
                    <!-- 左侧输入区 -->
                    <div class="input-zone">
                        <div class="input-ops">
                            <div class="input-ops-row">
                                <input type="file" id="fileInput" accept=".xlsx,.xls,.csv" style="display: none;"/>
                                <a href="#" class="btn btn-secondary example-btn btn-file-input" data-example="simple">选择Excel/CSV文件</a>
                                <a href="#" class="link-btn" data-example="simple">示例：简单表格</a>
                                <a href="#" class="link-btn" data-example="user">示例：用户信息</a>
                                <a href="#" class="link-btn" data-example="score">示例：成绩单</a>
                            </div>
                            <span id="errorMsg" class="error-msg"></span>
                        </div>
                        <textarea id="pasteInput" placeholder="可直接粘贴表格内容（支持CSV格式）" rows="18" class="input-textarea"></textarea>
                    </div>
                    <!-- 右侧输出区 -->
                    <div class="output-zone">
                        <div class="output-header output-header-block">
                            <button id="copyBtn" class="btn btn-outline copy-btn"><i class="fas fa-copy"></i> 复制</button>
                            <span class="btn-group">
                                <button id="convertBtn" class="btn btn-primary convert-btn"><i class="fas fa-sync-alt"></i> 转换为 JSON</button>
                                <button id="convertSqlBtn" class="btn btn-warning convert-btn"><i class="fas fa-database"></i> 转换为SQL Insert</button>
                            </span>
                        </div>
                        <textarea id="jsonOutput" readonly rows="18" class="output-textarea"></textarea>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <script type="text/javascript" src="../static/vendor/evalCore.min.js"></script>
    <!-- xlsx.full.min.js 复用 chart-maker/lib 目录下的文件 -->
    <script src="../chart-maker/lib/xlsx.full.min.js"></script>
    <script src="index.js" type="module"></script>
</body>
</html> 
